package com.mediator.self;

public class Fan extends Appliance {

    public Fan(String name, ApplianceMediator applianceMediator) {
        super(name, applianceMediator);
        applianceMediator.register(this,name);
    }

    public void openFan(){
        System.out.println("风扇打开了");
    }

    public void closeFan(){
        System.out.println("风扇关闭了");
    }

    @Override
    public void sendMessage(int messageType) {
        super.getApplianceMediator().getMessage(messageType,super.name);
    }


}
